package cn.itsource.ymcc.client;

import cn.itsource.result.JSONResult;
import cn.itsource.ymcc.dto.MessageDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "service-common",fallbackFactory = MessageClientFallbackFactory.class)
public interface MessageClient {

    /**
     * 公共服务公共接口-消息生产者-主要用来推送消息 - 被其它微服务使用openfeign调用
     *  支持邮件、短信、站内信
     * @param messageDto
     * @return
     */
    @PostMapping("/messageProducer/sendMsg")
    JSONResult sendMsg(@RequestBody MessageDto messageDto);
}
